#include <iostream>
#include <sys/types.h>
#include <sys/stat.h>
#include <cassert>
#include <cstring>
#include <fcntl.h>
#include <unistd.h>

#define NAMED_PIPE "./named_pipe"

bool creatnamedpipe(const char *pathname)
{
    int n = mkfifo(pathname, 0600);
    if (n == 0)
    {
        return true;
    }
    else
    {
        return false;
    }
}

void deletenamedpipe(const char *pathname)
{
    int n = unlink(pathname);
    assert(n == 0);
    (void)n;
}